<?php
// +----------------------------------------------------------------------
// | 前台单页面展示
// +----------------------------------------------------------------------
// | Copyright (c) 2015
// +----------------------------------------------------------------------
// | Author: baiping 125618036@qq.com http://www.webipcode.com
// +----------------------------------------------------------------------
// |2016-1-12 下午2:15:48
// +----------------------------------------------------------------------

class Page extends MY_Controller{
	
	public function detail(){
		$id = $this->uri->segment(3,0);
		if ( $id > 0 ){
			$this->load->model('Catgory_model', 'catgory');
			$catgory_info = $this->catgory->getFind(1, array('id'=>$id,'hide'=>0) );
		}else{
			//获取站点缓存信息
			$site_info = $this->getWebsitCache();
			redirect( $site_info['WEB_URL'] );
		}
		$template = empty( $catgory_info->template ) ? 'page/about' : $catgory_info->template;
		$this->load->view( $template );
	}
}